<template>
  <refresh @update="onUpdate" />
</template>
<script setup>
import refresh from '@/components/icon-refresh.vue'
import {
  useDataSourceManager,
  useQuery,
  useFiltersAudit,
  useSortAudit,
  useRowSelectionActive,
  useRowSelection,
} from './provide-context.js'
let { update } = useDataSourceManager()
let query = useQuery()
let rowSelection = useRowSelectionActive()
let { selectedRowKeys } = useRowSelection()
let filtersAudit = useFiltersAudit()
let sortAudit = useSortAudit()
function onUpdate() {
  // 初始化入参
  query.value.keyWord = ''
  query.value.current = 1
  query.value.pageSize = 10
  filtersAudit.value = null
  sortAudit.value = null
  selectedRowKeys.value = []
  rowSelection.value = false
  update()
}
</script>
